Recognition and Liveness
POSThttps://api.apptenticate.com/api/v3.2/biometrics/recognizer/face/
POST
https://api.apptenticate.com/api/v3.2/biometrics/recognizer/persons/
Authentication
Use your JWT obtained from the authentication process to make requests to this endpoint.
The response will be 401 unauthorized if the JWT is expired. In this case you will have to obtain a new JWT.
Liveness Detection Integrates
Our Facial Recognition and Person Creation services can now incorporate Liveness Detection, adding a vital layer of security to your verifications. If you have the Liveness service active in your account, you can submit the image of the person to be recognized or registered with additional parameters to automatically perform a liveness check.
Liveness Detection Modes:
• Standard Liveness Detection: This mode evaluates the authenticity of the person based solely on the image provided. It's ideal for passive verification against simple presentation attacks, ensuring the image isn't a photo of a photo or a screen.
• Liveness Detection Plus: This option offers a higher level of security. In addition to the image, it uses an encrypted file generated by our capture libraries. This allows for the detection of more sophisticated injection and presentation attacks, ensuring the capture is real and not a fraudulent impersonation.
When you integrate Liveness Detection, consider the following flow:
• If Liveness Detection returns FALSE, the service response will include detailed results of the liveness verification, indicating if any spoofing attempts (impersonation) were detected. This allows you to make informed and robust decisions, immediately rejecting fraudulent transactions.
• If Liveness Detection returns TRUE, the service will continue with its natural flow (Facial Recognition o Person Creation), indicating that the person successfully passed the liveness test.
For more details on how to send the necessary parameters for Liveness Detection in your requests and to explore implementation examples, please refer to the specific documentation for Liveness and Liveness Plus.
Request structure - method: POST / Create Person
- Liveness
- Liveness Plus
# JWT Token
header = { 'Authorization': 'Bearer {}'.format(token) }
# Payload for Base Request
data = {'citizen_id': '1234', 'name': 'Qwerty'}
# Where images are .jpg or .png files
files=[
('image',(unknow.jpeg',open('/D:/unknow.jpeg','rb'),'image/jpeg'))
]
apptenticate_url = "https://api.apptenticate.com/api/v3.2/biometrics/recognizer/persons/"
# Send Request
response = requests.post(
apptenticate_url,
data=data,
files=files,
headers=header
)
response = json.loads(response.content)
Capture Library: For more details on the capture library, please refer to the specific documentation for Liveness Plus.
# JWT Token
header = { 'Authorization': 'Bearer {}'.format(token) }
# Payload for Request with Liveness Plus
data = {'citizen_id': '1234', 'name': 'Qwerty'}
# Sends the encrypted file obtained from the capture library
files=[
('encrypted_file',('encrypted_file.bin',open('/ruta/a/tu/encrypted_file.bin','rb'),'application/octet-stream'))
]
apptenticate_url = "https://api.apptenticate.com/api/v3.2/biometrics/recognizer/persons/"
# Send Request
response = requests.post(
apptenticate_url,
data=data,
files=files,
headers=header
)
response = json.loads(response.content)
Request structure - method: POST / Facial Recognition
- Liveness
- Liveness Plus
# JWT Token
header = { 'Authorization': 'Bearer {}'.format(token) }
# Payload for Base Request
data = {'citizen_id': '1234', 'name': 'Qwerty'}
# Where images are .jpg or .png files
files=[
('image',(unknow.jpeg',open('/D:/unknow.jpeg','rb'),'image/jpeg'))
]
apptenticate_url = "https://api.apptenticate.com/api/v3.2/biometrics/recognizer/face/"
# Send Request
response = requests.post(
apptenticate_url,
data=data,
files=files,
headers=header
)
response = json.loads(response.content)
Capture Library: For more details on the capture library, please refer to the specific documentation for Liveness Plus.
# JWT Token
header = { 'Authorization': 'Bearer {}'.format(token) }
# Payload for Request with Liveness Plus
data = {'citizen_id': '1234', 'name': 'Qwerty'}
# Sends the encrypted file obtained from the capture library
files=[
('encrypted_file',('encrypted_file.bin',open('/path/encrypted_file.bin','rb'),'application/octet-stream'))
]
apptenticate_url = "https://api.apptenticate.com/api/v3.2/biometrics/recognizer/face/"
# Send Request
response = requests.post(
apptenticate_url,
data=data,
files=files,
headers=header
)
response = json.loads(response.content)
Response structure
- Liveness
- Liveness Plus
• Response (False):
data: {
"valid": false,
"message": "Face too small in pixels",
"error_code": 706
}
• Response (False):
data: {
"valid": false,
"error_code": 715,
"message": "Attack detected in the submitted image.",
"error_details": {
"capture_liveness": "For a positive result, a value of 1 must be obtained; value achieved: 0.0.",
"api_response": {
"face_liveness": {
"probability": 0.9607433
},
"capture_liveness": {
"score": 1.0851271,
"probability": 0.0
}
}
},
"id": 287
}